package com.lyh.db137.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyh.db137.entity.Role;
import com.lyh.db137.entity.Userrole;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
  * @Author: 想要告诉你
  * @CreateTime: 2024/12/24 11:48
  * @Description: 
  * @Version: 1.0
  */
public interface UserroleMapper extends BaseMapper<Userrole> {
    @Select("SELECT r.`id`, r.`rolename`, r.`description` FROM userrole u, role r WHERE u.`roleid`=r.`id` AND u.`userid`=#{uid}")
    public List<Role> selectRoleByUserId(Integer uid);
}